home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 142
/
Volume 142 Oct 17 2011 - Damaged.iso
/
Games
/
parasite-x.swf
/
scripts
/
frame_22
/
PlaceObject3_129_57
/
CLIPACTIONRECORD onClipEvent(load).as
< prev
Wrap
Text File
|
2011-10-17
|
577b
|
20 lines
onClipEvent(load){
function follow(targetx, targety)
{
var _loc2_ = targetx - _X;
var _loc1_ = targety - _Y;
var _loc4_ = Math.sqrt(_loc2_ * _loc2_ + _loc1_ * _loc1_);
var _loc5_ = acc * _loc2_ / _loc4_;
var _loc6_ = acc * _loc1_ / _loc4_;
xmove += _loc5_;
ymove += _loc6_;
var _loc3_ = Math.sqrt(xmove * xmove + ymove * ymove);
xmove = speed * xmove / _loc3_;
ymove = speed * ymove / _loc3_;
}
speed = 2 + _root.helpspeed;
acc = 0.2 + _root.helpspeed;
xmove = 0;
ymove = 0;
}